//
//  HeadView.m
//  zhubin
//
//  Created by dllo on 15/11/2.
//  Copyright © 2015年 zhu. All rights reserved.
//

#import "HeadView.h"
#import "FitHeader.h"

@implementation HeadView
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        void(^block)(NSString *) = ^(NSString *string)
        {
          
            _string = string;
           
        };
        _myBlock = block;
        
    _leftLabel = [[BaseLabel alloc]initWithFrame:CGRectMake(16 * FITWidth, 0, 184 * FITWidth, self.frame.size.height)];
        
    _rightLabel = [[BaseLabel alloc]initWithFrame:CGRectMake(_leftLabel.frame.origin.x + _leftLabel.frame.size.width, 0, 159 * FITHeight, self.frame.size.height)];
        [_rightLabel setFontSize:13];
        
        _moreImageView = [[UIImageView alloc] initWithFrame:CGRectMake(_rightLabel.frame.origin.x + _rightLabel.frame.size.width, 14 * FITHeight, 16 * FITHeight, 16 * FITHeight)];
        _moreImageView.image = [UIImage imageNamed:@"更多"];
        
        _leftImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 10 * FITHeight, 16 * FITHeight, 16 * FITHeight)];
        _leftImageView.image = [UIImage imageNamed:@"三角"];
        _rightLabel.userInteractionEnabled = YES;
        _rightLabel.textColor = [UIColor grayColor];
        _rightLabel.textAlignment = 2;
        [self addSubview:_leftLabel];
        [self addSubview:_rightLabel];
        [self addSubview:_moreImageView];
        [self addSubview:_leftImageView];
        self.backgroundColor = [UIColor whiteColor];
    }
    
    return self;
    
}
@end
